package com.modai.springcloud.entities;

import com.modai.springcloud.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ：modai
 * @date ：Created in 2020-12-6 20:29
 * @description：
 */
@RestController
@Slf4j
public class OrderController {
    @Resource
    private OrderService orderService;

    @GetMapping("/consumer/payment/{id}")
    public CommonResult getPaymentById(@PathVariable("id") long id){
        return orderService.getPaymentById(id);
    }
    @GetMapping(value = "/consumer/payment/openfeign/timeout")
    public String timeout(){
        return orderService.timeout();
    }
}
